/*
 * @Author: daidai
 * @Date: 2022-01-12 14:05:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2023-08-07 17:12:07
 * @FilePath: \web-pc\src\pages\big-screen\main.js
 */
import Vue from "vue";
import App from "./App.vue";
import router from './router'
import store from './store'
import { loading,borderBox13,digitalFlop,capsuleChart,borderBox8 } from '@jiaminghi/data-view'
import { Radio,Button,RadioGroup,Form,FormItem,Input,Message as ElMessage,Menu,MenuItem,Dropdown,DropdownMenu,DropdownItem,Aside,Container,Header,Main,Dialog,InputNumber,Upload,DatePicker,Table,TableColumn,Pagination,MessageBox,Alert,Scrollbar,Select,Option,Loading } from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css' // 不全局引入，改为在需要的页面单独引入
import Echart from './components/echart/index.vue'
import ItemWrap from './components/item-wrap/item-wrap.vue'
import MessageComp from './components/message/message.vue'
import Reacquire from './components/reacquire/reacquire.vue'
import Messages from './components/message/message'
import "vue-easytable/libs/theme-default/index.css";
import  '@/assets/css/public.scss'
import "@/assets/css/index.scss"

import * as filters from '@/directives/filters'
import { getAuthToken, setAuthToken } from './utils/auth'

require('./mock/mock') // Mock数据（包含后台管理登录接口）
Vue.config.productionTip = false;

// 在应用初始化时设置Token
const token = getAuthToken();
if (token) {
  setAuthToken(token);
}

// 自定义组件
Vue.component("Echart",Echart)
Vue.component("ItemWrap",ItemWrap)
Vue.component("Message",MessageComp)
Vue.component("Reacquire",Reacquire)
Vue.prototype.$Message =  Messages
// element组件
Vue.use(Radio);
Vue.use(Button);
Vue.use(RadioGroup);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Input);
Vue.use(Menu);
Vue.use(MenuItem);
Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Aside);
Vue.use(Container);
Vue.use(Header);
Vue.use(Main);
Vue.use(Dialog);
Vue.use(InputNumber);
Vue.use(Upload);
Vue.use(DatePicker);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Pagination);
Vue.use(Alert);
Vue.use(Scrollbar);
Vue.use(Select);
Vue.use(Option);
Vue.use(Loading.directive); // 添加Loading指令
Vue.prototype.$message = ElMessage;
Vue.prototype.$confirm = MessageBox.confirm;

// datav组件
Vue.use(loading)
Vue.use(borderBox13)
Vue.use(borderBox8)
Vue.use(digitalFlop)
Vue.use(capsuleChart)
// 全局数据过滤器
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app")